package org.dromara.demo.domain.bo;

import org.dromara.demo.domain.TestDemo2;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.util.List;

/**
 * 测试主从业务对象 test_demo2
 *
 * @author wenrui Su
 * @date 2024-03-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TestDemo2.class, reverseConvertGenerate = false)
public class TestDemo2Bo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 部门id
     */
    private Long deptId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 值
     */
    private String remark;

    /**
     * 子表集合
     */
    private List<TestDemo2LineBo> line;
}
